package rohyunji;

public class J28_PrinterInterface {

	//인터페이스를 사용하지 않은 경우 프린터 제조사를 예를듦
	
	public static void main(String[] args) {
		HPPrinter h=new HPPrinter();
//		h.speedPrint();
		CanonPrinter c=new CanonPrinter();
//		c.hyperPrint();
		EpsonPrinter e=new EpsonPrinter();
//		e.nanoPrint();
		
		h.print();
		c.print();
		e.print();
		
		Printable p=new HPPrinter();p.print();
		p=new CanonPrinter();p.print();
		p=new EpsonPrinter();p.print();
		
	}

}
class HPPrinter implements Printable
{
	
	@Override
	public void print() {
		// TODO Auto-generated method stub
		System.out.println("HP빠르다");
	}
}

class CanonPrinter implements Printable
{
	@Override
	public void print() {
		// TODO Auto-generated method stub
		System.out.println("Canon더빠르다");
	}
}
class EpsonPrinter implements Printable
{
	@Override
	public void print() {
		// TODO Auto-generated method stub
		System.out.println("epson LTE");
	}
}

interface Printable
{
	public void print();
	
}

class HPprinterDriver implements Printable
{
	public void print()
	{
		System.out.println("빠른출력속도 hp");
	}
}
